package com.dht.xiao.jianye.base.util;

/**
 * @author :      fangbingran
 * @aescription :工具
 * @date :        2019/06/15  11:38
 */
public class Utils {
    public static <T> T checkNotNull(T t, String message) {
        if (t == null) {
            throw new NullPointerException(message);
        }
        return t;
    }

    public static int parseInt(String value) {
        int parseResult = 0;
        try {
            parseResult = Integer.parseInt(value);
        } catch (NumberFormatException e) {
            e.printStackTrace();
            parseResult = 0;
        }
        return parseResult;
    }
}
